 package net.go176.backpack.util;
 
 import java.io.File;
 import java.io.FileInputStream;
 import java.io.IOException;

 import net.go176.backpack.util.simplenbt.NBTBase;
 import net.go176.backpack.util.simplenbt.NBTCompressedStreamTools;
 import net.go176.backpack.util.simplenbt.NBTTagCompound;


 public class NBTUtil
 {
   public static NBTTagCompound readNBTfromFile(File file) throws IOException {
     NBTTagCompound nbt;
     FileInputStream input = new FileInputStream(file);
     try {
       nbt = NBTCompressedStreamTools.read(input);
     } finally {
       input.close();
     } 
    return nbt;
   }
   
   public static boolean copyValue(String key, NBTTagCompound from, NBTTagCompound to) {
     NBTBase value = from.get(key);
     if (value != null) {
       to.set(key, value);
      return true;
     } 
     return false;
   }
 }


/* Location:              D:\User\Xuan\Downloads\MyBackpack1.2.5.jar!\net\saralab\mybackpac\\util\NBTUtil.class
 * Java compiler version: 7 (51.0)
 * JD-Core Version:       1.1.3
 */